﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<SLIC.Models.EntityModel.ImageGallery>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ViewImageGallery
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


    <%
        /// <summary>
        /// 
        ///  <title>SLIC</title>
        ///  <description>View Image Gallery page for View Images in a particular job </description>
        ///  <copyRight>Copyright (c) 2011</copyRight>
        ///  <company>IronOne Technologies (Pvt)Ltd</company>
        ///  <createdOn>2011-08-05</createdOn>
        ///  <author></author>
        ///  <modification>
        ///     <modifiedBy></modifiedBy>
        ///      <modifiedDate></modifiedDate>
        ///     <description></description>
        ///  </modification>
        ///
        /// </summary>                                                                                 
    %>


    <script type="text/javascript" src="../../../Content/LightBox/js/prototype.js"></script>
    <script type="text/javascript" src="../../../Content/LightBox/js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="../../../Content/LightBox/js/lightbox.js"></script>
    <% using (Html.BeginForm())
       {
           bool isReSubmission = false;
           try
           {
               if (ViewData["ReSubmission"] != null && Convert.ToBoolean(ViewData["ReSubmission"]))
               {
                   isReSubmission = true;
               }
           }
           catch (Exception)    
           {
               //error in coversion
           }
               %>
    <div id="gallery">
        <h2>
            Image Gallery for
            <%: ViewData["JobNo"]%></h2>
        <%--<img src="file:///C:/Users/rajithv/Desktop/image001.jpg" alt="some_text"/>--%>
        <%--<a href="file:///C:/Users/rajithv/Desktop/image001.jpg"  title="my caption">image #1</a>--%>
        <%--<img src="file:///D:/IronOne/SLIC/UploadedImages/Photos/ImageGallery/j1001/AccidentImages/ac1.jpg" alt="some_text"/>
    <img src="file:///D:/IronOne/SLIC/UploadedImages/Photos/ImageGallery/j1001/AccidentImages/ac2.jpg" alt="some_text"/>
    <img src="file:///D:/IronOne/SLIC/UploadedImages/Photos/ImageGallery/j1001/AccidentImages/ac3.jpg" alt="some_text"/>--%>
        <%  ModelState err = ViewContext.ViewData.ModelState["err"];
            SLIC.Controllers.GenException result = null;

            if (err != null)
            {
                result = (SLIC.Controllers.GenException)err.Errors.ElementAt(0).Exception;
        %>
        <%:result.Message%>
        <br />
        <%  }
            else
            {%>
        <div style="overflow: hidden;">
            <%-- <div id="innerContainer" style="width: 100%;
        overflow: hidden; float: left;"> <div class="ImageHeaderBox"> <div class="ImageHeaderIcon">
        <img src="../../../Content/images/arrowIcon.jpg" width="25px" /> </div> <div class="ImageHeaderText">
        Points Of Impact </div> </div> <div class="ImageFrameContainer"> <% if (Model !=
        null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        "PointsOfImpact", true))).Count() > 0) { foreach (SLIC.Models.EntityModel.ImageGallery
        item in Model) { %> <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        "PointsOfImpact", true))) { %> <div id="ImageFrame"> <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[PointsOfImpact]" title="<%=item.Info%>"> <img
        src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" height="180" alt="" /></a> </div> <%} } } else
        {%> No image available.<%} %> </div> </div> <div id="innerContainer" style="width:
        48%; overflow: hidden; float: right;"> <div class="ImageHeaderBox"> <div class="ImageHeaderIcon">
        <img src="../../../Content/images/arrowIcon.jpg" width="25px" /> </div> <div class="ImageHeaderText">
        Driver Statement </div> </div> <div class="ImageFrameContainer"> <% if (Model !=
        null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        "DriverStatement", true))).Count() > 0) { foreach (SLIC.Models.EntityModel.ImageGallery
        item in Model) { %> <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        "DriverStatement", true))) { %> <div id="ImageFrame"> <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[DriverStatement]" title="<%=item.Info%>"> <img
        src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a> </div> <%} } } else {%> No images
        available. <%} %> </div> </div>--%>
          <%if (!isReSubmission)
            {%>
            <div id="innerContainer" style="overflow: hidden; margin-top: 0px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Points Of Impact
                    </div>
                </div>
                <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.PointsOfImpact.ToString(), true))).Count() > 0)
                   {
                       foreach
                           (SLIC.Models.EntityModel.ImageGallery item in Model)
                       { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.PointsOfImpact.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[PointsOfImpact]" title="<%=item.LightBoxCaption%>" id="<%=item.ImageId%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" height="180" /></a>
                </div>
                <%}
                       }
                   }
                   else
                   { %>
                <div style="padding: 0px 15px 15px 15px; text-align: center; width: 100%">
                    No images available.</div>
                <%} %>
            </div>
           <%} %>
                       <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                       D/L Statement
                    </div>
                </div>
                <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.DLStatement.ToString(), true))).Count() > 0)
                   {
                       foreach
                           (SLIC.Models.EntityModel.ImageGallery item in Model)
                       { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.DLStatement.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[DLStatement]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                       }
                   }
                   else
                   { %>
                <div style="padding: 0px 15px 15px 15px; text-align: center; width: 100%">
                    No images available.</div>
                <%} %>
            </div>

            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                     Technical Officer Comments
                    </div>
                </div>
                <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.TechnicalOfficerComments.ToString(), true))).Count() > 0)
                   {
                       foreach
                           (SLIC.Models.EntityModel.ImageGallery item in Model)
                       { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.TechnicalOfficerComments.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[TechnicalOfficerComments]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                       }
                   }
                   else
                   { %>
                <div style="padding: 0px 15px 15px 15px; text-align: center; width: 100%">
                    No images available.</div>
                <%} %>
            </div>

            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                     Claim Form Image
                    </div>
                </div>
                <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.ClaimFormImage.ToString(), true))).Count() > 0)
                   {
                       foreach
                           (SLIC.Models.EntityModel.ImageGallery item in Model)
                       { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.ClaimFormImage.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[ClaimFormImage]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                       }
                   }
                   else
                   { %>
                <div style="padding: 0px 15px 15px 15px; text-align: center; width: 100%">
                    No images available.</div>
                <%} %>
            </div>

            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Document Images
                    </div>
                </div>
                <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.DriverStatement.ToString(), true))).Count() > 0)
                   {
                       foreach
                           (SLIC.Models.EntityModel.ImageGallery item in Model)
                       { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.DriverStatement.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[DriverStatement]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                       }
                   }
                   else
                   { %>
                <div style="padding: 0px 15px 15px 15px; text-align: center; width: 100%">
                    No images available.</div>
                <%} %>
            </div>           
  <%if (isReSubmission)
              {%> 
               <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.ARI.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        ARI
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.ARI.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[ARI]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%} %>
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.DR.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        DR
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.DR.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[DR]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%} %>
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SeenVisit.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Seen Visit
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SeenVisit.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[SeenVisit]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%} %>
            <%
                  if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
                  SLIC.Models.Enums.FieldName.SpecialReport1.ToString(), true))).Count() > 0)
                  { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Special Report 1
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SpecialReport1.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[SpecialReport1]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}
            %>
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SpecialReport2.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Special Report 2
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SpecialReport2.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[SpecialReport2]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}
            %>
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SpecialReport3.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Special Report 3
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SpecialReport3.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[SpecialReport3]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}
            %>
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary1.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Supplementary 1
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary1.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[Supplementary1]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}
            %>
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary2.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Supplementary 2
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary2.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[Supplementary2]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}%>
               <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary3.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Supplementary 3
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary3.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[Supplementary3]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}%>
               <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary4.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Supplementary 4
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Supplementary4.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[Supplementary4]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}%>
               <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Acknowledgment.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                       Acknowledgment
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.Acknowledgment.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[Acknowledgment]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}%> 
            <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SalvageReport.ToString(), true))).Count() > 0)
               { %>
            <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                    SalvageReport
                    </div>
                </div>
                <% foreach (SLIC.Models.EntityModel.ImageGallery item in Model)
                   { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.SalvageReport.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[SalvageReport]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                   } %>
            </div>
            <%}
              } //END IsReSubmission %>
             
              <div id="innerContainer" style="overflow: hidden; margin-top: 10px;">
                <div class="ImageHeaderBox">
                    <div class="ImageHeaderIcon">
                        <img src="../../../Content/images/arrowIcon.jpg" width="25px" />
                    </div>
                    <div class="ImageHeaderText">
                        Accident Images
                    </div>
                </div>
                <% if (Model != null && Model.Where(x => x.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.AccidentImages.ToString(), true))).Count() > 0)
                   {
                       foreach
                           (SLIC.Models.EntityModel.ImageGallery item in Model)
                       { %>
                <% if (item.FieldId.Equals((byte)Enum.Parse(typeof(SLIC.Models.Enums.FieldName),
        SLIC.Models.Enums.FieldName.AccidentImages.ToString(), true)))
                   { %>
                <div id="ImageFrame">
                    <a href="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" rel="lightbox[AccidentImages]" title="<%=item.LightBoxCaption%>">
                        <img src="../../HandlerClasses/imagehandler.ashx?path=<%=ConfigurationManager.AppSettings["ImageSavePath"].ToString()
        %><%=item.ImagePath%>" width="230" alt="" /></a>
                </div>
                <%}
                       }
                   }
                   else
                   { %>
                <div style="padding: 0px 15px 15px 15px; text-align: center; width: 100%">
                    No images available.</div>
                <%} %>
            </div>

        </div>
        <%} //END else part //NO Exceptions %>
        <br />        
        <div class="buttons" style="float: right;">
              <input type="button" onclick="window.history.back()" value="Back" class="button" />
    <%--    <%if (!isReSubmission)
          { %>
            <input type="button" onclick="parent.location='<%:
    Url.Action("GetJobByJobNo", "Job", new { JobNumber=ViewData["JobNo"] }) %>';return
    false;" value="Back" class="button" />
    <%}%>--%>
       
        </div>
    </div>
    <%} %>
</asp:Content>
